package com.tubi.innerclass5;

public class test5innerclass {
    public static void main(String[] args) {

     goSwimming(new Swimming() {
         @Override
         public void swim() {
             System.out.println("铁质，我不去");
         }
     });

    }
    /*
     使用接口的方法
     */
    public static void goSwimming(Swimming swimming){
        swimming.swim();
    }
}

interface  Swimming{
    void swim();
}
